const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}

module.exports = {
    // publicPath:'/api',
    devServer: {
        open: true,
        contentBase: 'src',
        port: 8081,
        hot: true,
        proxy: {
            '/api': {
                // target: `http://182.92.129.73:8080`,
                // target: `http://192.168.170.239:8080`,
                // target: `http://192.168.170.238:8080`,//军哥
                // target: `http://192.168.64.172:8080/`,//翔宇
                // target: `http://jxback.test.myhope365.com/`,
                // target: `http://jxgl1234.free.svipss.top/`,
                target: `http://192.168.2.126:8080/`,

                // target: `http://192.168.187.23:8080/`,
                // target: `http://192.168.64.172:8080/`,
                // changeOrigin:true,唐硕
                /* vpn */
                // target: 'http://10.9.0.56:88',
                // ws: true,
                pathRewrite: {
                    '^/api': '/'
                }
            },
        }
    },

    configureWebpack: {
        name: '教学学习平台',
        resolve: {
            alias: {
                '@': resolve('src')
            }
        }
    },
}
